﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Kaiser.Models;
using Kaiser.Repositories;
using Kaiser.Models.InputModels;

namespace Kaiser.Services.Impl
{
    public class SystemManageService : ISystemManageService
    {
        private readonly IRepository _repository;

        public SystemManageService(IRepository repository)
        {
            _repository = repository;//
        }

        public void InsertOrg(Kaiser.Models.Org model) 
        {
            _repository.InsertOrg(model);
        }


        public void UpdateOrg(Kaiser.Models.Org model)
        {
            _repository.UpdateOrg(model);
        }


        public DataGrid<Kaiser.Models.Org> GetSyncOrgTree(string deptid)
        {
            return _repository.GetSyncOrgTree(deptid);
        }


        public void InsertUser(UserBasic model)
        {
            _repository.InsertUser(model);
        }

        public void DeleteUser(string UserName)
        {
            _repository.DeleteUser(UserName);
        }

        public void UpdateUser(UserBasic mode)
        {
            _repository.UpdateUser(mode);
        }


        public Kaiser.Models.Org GetOrg(string id)
        {
            throw new NotImplementedException();
        }
    }
}
